import re

def check_insert_statements(filename):
    with open(filename, 'r', encoding='utf-8') as file:
        statements = file.readlines()

    for statement in statements:
        # 移除首尾的空白字符和换行符
        line  = statement.strip()

        # 检查是否为插入语句
        if line.startswith("INSERT"):
            # 使用正则表达式匹配插入语句的格式
            pattern = r'INSERT INTO cu_scrm.`scrm_payee_integrate`(`id`, `student_name`, `phone_number`, `crm_contract_no`, `crm_name`, `consult_project`, `class_type_id`, `class_name_cite`, `consume_detail`, `current_payee_money`, `insurance_price`, `insurance_price_sum`, `payee_way`, `business_division`, `center`, `department`, `campus`, `register_time`, `status`, `is_locking`, `remark`, `register_id`, `payee_create_time`, `payee_major`, `receipt_registrant`, `payee_image`, `counselor_id`, `from_type`, `deleted`, `create_type`, `cust_id`, `cust_name`, `create_time`, `edit_id`, `edit_name`, `update_time`, `proportion`) VALUES '
            if pattern not in line:
                print(f"Invalid syntax: {line}")

# 使用示例
filename = r'C:\\Users\\EDZ\\Desktop\\800收款单全量.sql'
check_insert_statements(filename)
